//package com.dishi.hj212.server;
//
//import com.alibaba.fastjson2.JSON;
//import com.dishi.hj212.core.DataAreaParser;
//import com.dishi.hj212.core.T212Parser;
//import com.dishi.hj212.exception.T212FormatException;
//
//
//import com.dishi.hj212.model.DataSegment;
//import org.springframework.stereotype.Component;
//
//import javax.annotation.PostConstruct;
//import java.io.FileReader;
//import java.io.Reader;
//import java.util.Map;
//
///**
// * @author: ds
// * @date: 2024/2/21 10:48
// */
//@Component
//public class GroundwaterDecoder {
//
//
////    @PostConstruct
//    void run() throws Exception {
//        Reader reader = new FileReader("src/main/resources/sample/GroundwaterMessage.txt");
//
//        T212Parser t212Parser = new T212Parser(reader);
//        Map<String, String> segmentMap = t212Parser.readDataSegmentMap();
//        DataSegment dataSegment = JSON.parseObject(JSON.toJSONString(segmentMap), DataSegment.class);
//        String cp = dataSegment.getCp();
//        DataAreaParser dataAreaParser = new DataAreaParser();
//        Map<String, String> dataAreaMap = dataAreaParser.readDataAreaMap(cp);
//
//    }
//}
